<?php
	require_once("../connectMysql/connetMysql.class.php");
	$personId=$_GET['personId']; 
	$user = array('注册会员','技术','设计','产品','打杂','运营','投资人');
	$usersex= array('男','女');
	$db=new connetMysql;
	$con=$db->getConnect();
	$chk_sql="SELECT userTypea,userSexa,homeArea,liveArea,userAgea,UserName,UserBirth,UserTypeId,UserDescri,UserSex,RegisterTime,HomeProv,HomeCity,LivProv,LivCity,Skill,OpenContact,WorkExper,EduExper FROM user WHERE UserId=".$personId;	
	$result=$con->query($chk_sql);
	$row = mysqli_fetch_assoc($result);
	$flag = 0;//0为app，1为web
	if(isset($row['UserSex'])) 
	{
		$flag = 1;
	}
	else
	{
		$flag = 0;
	}
	if ($flag==1) 
	{
		$arr = array( 
		'UserName' => $row['UserName'], 
		'userAge' => $row['UserBirth'], 
		'UserType' => $user[$row['UserTypeId']],
		'UserDescri' => $row['UserDescri'],
		'UserSex' => $usersex[$row['UserSex']-1], 
		'RegisterTime' => $row['RegisterTime'], 
		'HomeArea' => $row['HomeProv'].$row['HomeCity'],  
		'LiveArea' => $row['LivProv'].$row['LivCity'],
		'Skill' => $row['Skill'], 
		'OpenContact' => $row['OpenContact'], 
		'WorkExper' => $row['WorkExper'], 
		'EduExper' => $row['EduExper']
 		 ); 
	}
	else
	{
		$arr = array( 
		'UserName' => $row['UserName'], 
		'userAge' => $row['userAgea'], 
		'UserType' => $row['userTypea'],
		'UserDescri' => $row['UserDescri'],
		'UserSex' => $row['userSexa'], 
		'RegisterTime' => $row['RegisterTime'], 
		'HomeArea' => $row['homeArea'],  
		'LiveArea' => $row['liveArea'],
		'Skill' => $row['Skill'], 
		'OpenContact' => $row['OpenContact'], 
		'WorkExper' => $row['WorkExper'], 
		'EduExper' => $row['EduExper']
 		 ); 
	}
		

	$con->close(); 
	echo json_encode($arr);
?>